package solutions.leetcode.normal

/**
 * @author lizhidong
 * <a href="https://leetcode.cn/problems/increment-submatrices-by-one/">2536. 子矩阵元素加 1</a>
 */
private class Solution2536 {
    fun rangeAddQueries(n: Int, queries: Array<IntArray>): Array<IntArray> {
        val rst = Array(n) { IntArray(n) }
        for (item in queries) {
            for (i in item[0]..item[2]) {
                for (j in item[1]..item[3]) {
                    rst[i][j]++
                }
            }
        }
        return rst
    }
}

fun main() {

}